Display small iconic representation for menu titles.
Version 1.9
This hack is an implementation of an idea suggested by USENET readers* as a method for reclaiming menu bar space. It has no real interface, but it is configurable (with ResEdit). I pronounce the name “my-kin”; you can pronounce it however you like, Pat.
MICN is still free, still less than 20K on your disk, and it’s still only 580 bytes of code in your System Heap! MICN does not replace the titles of menus in memory, so programs that use these titles will find them in the proper place.
MICN comes preconfigured to display SICNs for the following menu titles: File, Edit, Font, Help, Window(s). If you want to add more SICNs, remove the standard ones, or otherwise customize MICN, you will need ResEdit or a similar resource editor.
There are some color icons for the standard menus and for Finder’s menus, and more can be added as you wish. However, color icons can only be accessed from the global MICN list (wait for the next release if you really need color icons in local MICN lists).
MICN Lists
MICN uses a special resource/data structure, called a MICN list, to determine which menu titles it replaces with icons. MICN lists may be edited with ResEdit by double-clicking on the appropriate MICN resource (a resource template (TMPL) is provided to make editing easier). The format of a MICN list is loosely comparable to this Pascal record structure:
MICNList = array [1..n] of record
title: string;
width: integer;
index: integer;
resID: integer;
cicnID: integer
end;
title: the title of the menu to replace (e.g. “File” or “Edit”)
width: the width of the SICN in pixels (0 defaults to 16)
index: index within the SICN resource of this menu’s icon
resID: resource ID of the SICN resource that contains this menu’s icon.
cicnID: resource ID of the cicn resource that contains the menu’s color icon.
(Note that the last four fields are packed against the string on word boundary.)
'SICN' resources
MICN displays a SICN resource for the menu titles it is told to iconify. This is a standard resource type that can be created and edited using ResEdit. Each menu title has two icons within it’s SICN resource: enabled and disabled. The index field of a MICN list refers to the index of the enabled icon, and the disabled icon follows immediately afterwards. For this reason, index will usually be even, and every SICN resource will have an even number of icons.
'cicn' resources
MICN displays a cicn (color icon) resource for the menu titles it is told to iconify if color is available on the system. This is a standard resource type that can be created and edited using ResEdit. Why cicn resources and not ics4/ics8 resources? Well, it was the easiest way to go at the time. I think a later version will look for ics4/ics8 icons as well as cicns and SICNs, so be patient if you think this is important. Hey, at least it still works with System 6 (and back to 4.1, for that matter).
Global MICN list
MICN maintains a “Global” MICN list, which it uses to replace menu titles in ALL open applications. This list is kept in MICN’s resource fork and must be MICN=128 (res type is MICN, res id is #128). This list is consulted FIRST when determining whether or not to iconify a menu title. If you make any changes, you must restart for them to take effect.
Application MICN lists
Each application can have its own private MICN list, and associated SICNs. To give an app a private list, merely add a resource of type MICN, id #128, to the app’s resource fork, fill it with appropriate values, and also create the associated SICN resource(s). An application’s MICN list is consulted AFTER the global MICN list. It will be used as soon as you open the application; you needn’t restart your computer.
(In)compatabilities, bugs, and other foo
Although I haven’t encountered any incompatabilities yet, I’m sure they exist. I have tested on A Mac 512Ke, Plus, II, LC, IIci, and Quadra 700 under System 6.0.5, 7.0, and 7.1. And the biggest test of all… it works with Microsoft products! :-) I use traps from IM I and IM II to do the standard B&W icons, and from IM V to do the color icons (after checking for there existance), so I don’t expect too many version problems. Found a bug? Send e-mail to me at: kurash@dartmouth.edu
One might conclude that MICN impinges on the speed of your Mac. To a certain extent, this is true (it has to do something!). However, if you keep the global MICN list relatively small (less than 100 menu titles is small enough), and put specialized stuff where it belongs (in applications’ private MICN lists), then you won’t notice a thing.
What’s changed since 1.0:
1.1 made the memory-resident code smaller
1.2 added control panel interface
1.3 fixed a bug in the interface
1.4 got rid of that fanTAStic cache-card incompatibility
1.5 no more on-the-fly patching
no more self-modifying code
gray icons for disabled menus on color/grayscale monitors
1.6 Wherein I correct a mistake
that only an idiot should make
1.7 Color icons! Maybe I’ll work on that interface some day…
Color icons can only be used from the global MICN list (for now).
1.8 Whaddayamean you don’t have Color QD? (i.e., I fixed a bug in the INIT)
1.9 For die-hard System 6 users who have color monitors (can’t use _GetGray)
There is now some documentation for the control panel interface, written by: